﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopGroupData")]
    public class GroupData : BaseObject
    {
        //begin
        public GroupData()
        {}
        public GroupData(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _GroupId;
        public string GroupId
        {
            get
            {
                return _GroupId;
            }
            set
            {
                SetPropertyValue("GroupId", ref _GroupId, value);
            }
        }
        private string _GroupName;
        public string GroupName
        {
            get
            {
                return _GroupName;
            }
            set
            {
                SetPropertyValue("GroupName", ref _GroupName, value);
            }
        }
        private string _PlatformId;
        public string PlatformId
        {
            get
            {
                return _PlatformId;
            }
            set
            {
                SetPropertyValue("PlatformId", ref _PlatformId, value);
            }
        }
        private DateTime _GroupStartTime;
        public DateTime GroupStartTime
        {
            get
            {
                return _GroupStartTime;
            }
            set
            {
                SetPropertyValue("GroupStartTime", ref _GroupStartTime, value);
            }
        }
        private DateTime _GroupEndTime;
        public DateTime GroupEndTime
        {
            get
            {
                return _GroupEndTime;
            }
            set
            {
                SetPropertyValue("GroupEndTime", ref _GroupEndTime, value);
            }
        }
        private bool _JuView;
        public bool JuView
        {
            get
            {
                return _JuView;
            }
            set
            {
                SetPropertyValue("JuView", ref _JuView, value);
            }
        }
        [Association("GroupDataItemList", typeof(ItemData)), Aggregated]
        public XPCollection<ItemData> ItemList
        {
            get
            {
                return GetCollection<ItemData>("ItemList");
            }
        }
        //end
    }
}
